

Rsd.define('Rsd.Faith.pages.BookXiaoQuZongZhangListPage', {
    extend: 'Rsd.Faith.pages.ListPage',
    requires: ['Rsd.controlEx.ComboBoxEnum'],
    xtype: 'list-f-xiao_qu-zhang',
    border: false,
    tabTitle: '小区总账',
    searchColumns:[{name:'XiaoQuBianHao',"text": "小区编号"},{name:'XiaoQuMingCheng',"text": "小区名称"}],
    newButtons:[],
    modelType: 'BookXiaoQuZongZhangModel',
    readOnly:false,
    formFields: [],
    gridColumns:[
        {
            "text": "序号",
            "xtype": "index",
            "width": 40,
            "index": 0
        },
        {
            "name": "XiaoQuMingCheng",
            "dataIndex": "XiaoQuMingCheng",
            "sortable": false,
            "text": "小区",
            "index": 23,
            "exist": true,
            "xtype": "template",
            align: 'left',
            formatString: "#=XiaoQuMingCheng=#(#=XiaoQuBianHao=#)",
            "width": 100,
            "nobr": true
        },
       /* {
            "name": "XiaoQuBianHao",
            "dataIndex": "XiaoQuBianHao",
            "sortable": false,
            "text": "小区编号",
            "index": 22,
            "exist": true,
            "xtype": "string",
            "width": 50,
            "nobr": true
        },*/
        {
            "name": "SuoShuQi",
            "dataIndex": "SuoShuQi",
            "sortable": false,
            "text": "当前所属期",
            "index": 24,
            "exist": true,
            "xtype": "string",
            align:'center',
            "width": 50,
            "nobr": true,
            "deep": 1
        },
        {
            "name": "JiaoCunJinE_ZZ",
            "dataIndex": "JiaoCunJinE_ZZ",
            "sortable": false,
            "text": "缴存(住宅)",
            "index": 28,
            "exist": true,
            "xtype": "number",
            "total":true,
            "width": 100,
            "precision": 2
        },

        {
            "name": "ShiYongJinE_ZZ",
            "dataIndex": "ShiYongJinE_ZZ",
            "sortable": false,
            "text": "使用(住宅)",
            "index": 32,
            "exist": true,
            "xtype": "number",
            "total":true,
            "width": 100,
            "precision": 2
        },
        {
            "name": "YuE_ZZ",
            "dataIndex": "YuE_ZZ",
            "sortable": false,
            "text": "余额(住宅)",
            "index": 40,
            "exist": true,
            "xtype": "number",
            "total":true,
            "width": 100,
            "precision": 2
        },

        /*{
            "name": "JiaoCunJinE_DT",
            "dataIndex": "JiaoCunJinE_DT",
            "sortable": false,
            "text": "缴存(电梯/消防)",
            "index": 34,
            "exist": true,
            "xtype": "number",
            "width": 100,
            "precision": 2
        },

        {
            "name": "ShiYongJinE_DT",
            "dataIndex": "ShiYongJinE_DT",
            "sortable": false,
            "text": "使用(电梯/消防)",
            "index": 38,
            "exist": true,
            "xtype": "number",
            "width": 100,
            "precision": 2
        },

        {
            "name": "YuE_DT",
            "dataIndex": "YuE_DT",
            "sortable": false,
            "text": "余额(电梯/消防)",
            "index": 42,
            "exist": true,
            "xtype": "number",
            "width": 100,
            "precision": 2
        },*/

        // {
        //     "name": "ZengZhiJinE",
        //     "dataIndex": "ZengZhiJinE",
        //     "sortable": false,
        //     "text": "增值收入",
        //     "index": 30,
        //     "exist": true,
        //     "xtype": "number",
        //     "width": 100,
        //     "precision": 2
        // },
        // {
        //     "name": "ZengZhiShiYong",
        //     "dataIndex": "ZengZhiShiYong",
        //     "sortable": false,
        //     "text": "增值支出",
        //     "index": 36,
        //     "exist": true,
        //     "xtype": "number",
        //     "width": 100,
        //     "precision": 2
        // },
        {
            "name": "ZengZhiYuE",
            "dataIndex": "ZengZhiYuE",
            "sortable": false,
            "text": "统筹余额",
            "index": 27,
            "exist": true,
            "xtype": "number",
            "total":true,
            format:'format_shi_yong',
            "width": 100,
            "precision": 2
        },
      /*  {
            "name": "QiChuJinE_ZZ",
            "dataIndex": "QiChuJinE_ZZ",
            "sortable": false,
            "text": "余额合计",
            "index": 26,
            "exist": true,
            "xtype": "number",
            "width": 100,
            "precision": 2
        },*/
        {
            "name": "FenHuLiXi",
            "dataIndex": "FenHuLiXi",
            "sortable": false,
            "text": "分户利息合计",
            "index": 30,
            "exist": true,
            "xtype": "number",
            "total":true,
            "width": 100,
            "precision": 2,
            "deep": 1
        },
        {
            "name": "ZhangHuBianHao",
            "dataIndex": "ZhangHuBianHao",
            "sortable": false,
            "text": "账户编号",
            "index": 20,
            "exist": true,
            "xtype": "string",
            "width": 100,
            "nobr": true
        },
        {
            "name": "JianZhangRiQi",
            "dataIndex": "JianZhangRiQi",
            "sortable": false,
            "text": "建账日期",
            "index": 24,
            "exist": true,
            "xtype": "date",
            "formatString": "yyyy-MM-dd",
            "width": 100,
            "precision": 3
        },
        {
            "name": "ZhuangTai",
            "dataIndex": "ZhuangTai",
            "sortable": false,
            "text": "状态",
            "index": 44,
            "exist": true,
            "xtype": "enum",
            "enum": {
                "name": "Rsd.Faith.Core.ZhuangHuZhuangTai",
                "items": [
                    {
                        "code": "DG",
                        "text": "中心代管",
                        "value": 0
                    },
                    {
                        "code": "ZG",
                        "text": "小区自管",
                        "value": 1
                    },
                    {
                        "code": "TH",
                        "text": "已退伙",
                        "value": 2
                    }
                ]
            },
            "width": 100,
            "nobr": true
        },
        {
            "name": "Remark",
            "dataIndex": "Remark",
            "sortable": false,
            "text": "备注",
            "index": 50,
            "exist": true,
            "xtype": "string",
            "width": 50,
            "nobr": true
        }
    ],
    formTitle:'资金总账',
    titleField : 'SuoShuQi',
    /*
     * */
    constructor: function (config) {
        config = config || {};
        Rsd.apply(this, config);
    },
    format_shi_yong:function format_shi_yong(row) {
        return [
            Rsd.button('查看',function () {
            alert('查看统筹账户详情');
        })]
    }

});